// (c) 2010 OpenSeadragon, (c) 2010 CodePlex Foundation
Seadragon.Point=Seadragon.Point=function(a,b){this.x=typeof a=="number"?a:0;this.y=typeof b=="number"?b:0};Seadragon.Point.prototype={plus:function(a){return new Seadragon.Point(this.x+a.x,this.y+a.y)},minus:function(a){return new Seadragon.Point(this.x-a.x,this.y-a.y)},times:function(a){return new Seadragon.Point(this.x*a,this.y*a)},divide:function(a){return new Seadragon.Point(this.x/a,this.y/a)},negate:function(){return new Seadragon.Point(-this.x,-this.y)},distanceTo:function(a){return Math.sqrt(Math.pow(this.x-a.x,2)+Math.pow(this.y-a.y,2))},apply:function(a){return new Seadragon.Point(a(this.x),a(this.y))},equals:function(a){return a instanceof Seadragon.Point&&this.x===a.x&&this.y===a.y},toString:function(){return"("+this.x+","+this.y+")"}};